<script type="text/javascript">
	$(function(){
		$("#form").validate({
			rules: 
			{
				title: 
				{ 
					required: true
				},
				detail: 
				{ 
					required: true
				}
			},
			messages:
			{
				title: 
				{ 
					required: "กรุณากรอกหัวข้อค่ะ"
				},
				detail: 
				{ 
					required: "กรุณากรอกรายละเอียดค่ะ"
				}
			}
		});
	});
</script>
<h1>ประชาสัมพันธ์</h1>
<ul id="breadcrumb">
	<li>ประชาสัมพันธ์</li>			
</ul>
<div id="content">
<form id="form" action="information/save" method="post" enctype="multipart/form-data">
<table class="form">
	<tr><th>หัวข้อ</th><td><input type="text" name="title" value="<?php echo $rs['title'] ?>" /></td></tr>
	<tr><th>รายละเอียด</th><td><?php echo form_textarea('detail',$rs['detail']) ?></td></tr>
</table>
<br /><br />
<?php echo Modules::run('files/information_list_file', $rs['id']); ?>
<br /><br />
<input class="button" type="submit" value="<?php echo lang('btn_submit')?>" />
<input class="button" type="button" value="<?php echo lang('btn_back')?>"  onclick="window.location = 'information'" />
<input type="hidden" name="id" value="<?php echo $rs['id'] ?>" />
			<input type="hidden" name="<?php echo ($rs['id'])?'updated':'created' ?>" value="<?php echo time() ?>" />
</form>
</div>